<extend name="Public/base" />

<block name="body">
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title cf">
        <h2>新增 [{$model['title']}]</h2>
    </div>
    <!-- 标签页导航 -->
<div class="tab-wrap">
    <ul class="tab-nav nav">
        <li data-tab="tab1" class="current"><a href="javascript:void(0);">基础</a></li>
    </ul>
    <div class="tab-content zc_for">
    <!-- 表单 -->
    <form id="form" action="{:U('add?model='.$model['id'])}" method="post" class="form-horizontal">
        <!-- 基础文档模型 -->
        <div id="tab1" class="tab-pane in tab1 tab-look">
    		<table  border="0" cellspacing="0" cellpadding="0">
                <tbody>
                  <tr>
                    <td class="l">游戏名称：</td>
                    <td class="r" >
                       <select id="game_id" name="game_id">
                       <volist name=":get_game_list()" id="vo">
                        <option value="{$vo.id}">{$vo.game_name}</option>
                       </volist>
                       </select>
                       <input type="hidden" id="game_name" name="game_name" value=""></input>
                    </td>

                    <td class="l">区服名称：</td>
                    <td class="r" >
                        <input type="text" class="txt " name="server_name" value="">
                    </td>
                  </tr>
                  <tr>
                    <td class="l">显示状态：</td>
                    <td class="r">
                        <label class="inp_radio">
                            <input type="radio" class="inp_radio" value="0" name="show_status">关闭
                            <input type="radio" class="inp_radio" value="1" name="show_status" checked="checked">开启
                        </label>
                    </td>
                  </tr>
                  <tr>
                    <td class="l">区服状态：</td>
                    <td class="r">
                        <label class="inp_radio">
                            <input type="radio" class="inp_radio" value="0" name="server_status" checked="checked">正常
                            <input type="radio" class="inp_radio" value="1" name="server_status" >拥挤
                            <input type="radio" class="inp_radio" value="2" name="server_status" >爆满
                        </label>
                    </td>
                  </tr>
                  <tr>
                    <td class="l">开服时间：</td>
                    <td class="r" colspan='3'>
                        <input type="text" class="txt time" name="start_time" value="">
                    </td>
                    <td class="l"></td><td class="r"></td>
                  </tr>
                  <tr>
                    <td class="l">区服描述：</td>
                    <td class="r" colspan='3'>
                        <textarea name="desride" class="txt_area1"></textarea>
                    </td>
                  </tr>
                </tbody>
            </table>
        </div>
        <div class="form-item cf">
            <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <a class="btn btn-return" href="javascript:history.back(-1);">返 回</a>
        </div>
    </form>
    </div>
</div>
</block>

<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
//导航高亮
highlight_subnav('{:U('Server/lists')}');
$('#submit').click(function(){
    $('#form').submit();
});

$(function(){
    $("#game_name").val($("#game_id option:selected").text());
    $('.date').datetimepicker({
        format: 'yyyy-mm-dd',
        language:"zh-CN",
        minView:2,
        autoclose:true
    });
    $('.time').datetimepicker({
    language:"zh-CN",
     hour: 13,
       minute: 15
    });
    showTab();

});

/*获取游戏名称*/
$("#game_id").change(function() {
    $("#game_name").val($("#game_id option:selected").text());
});


</script>
</block>
